﻿<sc:MediaApplicationPage
    x:Class="Subsonic.Pages.SettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    xmlns:sc="clr-namespace:Subsonic.Controls"
    xmlns:local="clr-namespace:ControlTiltEffect"
    shell:SystemTray.IsVisible="True">

    <phone:PhoneApplicationPage.Resources>
        <DataTemplate x:Key="SettingsItemTemplate">
            <StackPanel x:Name="DataTemplateStackPanel" Orientation="Horizontal">
                <Image x:Name="ItemImage" Visibility="{Binding ItemImageVisibility}" Source="{Binding ItemImage}" Height="75" Width="75" VerticalAlignment="Top" Margin="10,0,20,0"/>
                <StackPanel VerticalAlignment="Center">
                    <TextBlock x:Name="ItemText" Text="{Binding LineOne}" Margin="-2,-13,0,0" Style="{StaticResource PhoneTextExtraLargeStyle}" local:TiltEffect.IsTiltEnabled="True"/>
                    <TextBlock x:Name="DetailsText" Text="{Binding LineTwo}" Margin="0,-6,0,3" Style="{StaticResource PhoneTextSubtleStyle}"/>
                </StackPanel>
            </StackPanel>
        </DataTemplate>
        
        <DataTemplate x:Key="SettingsPivotItemTemplate">
            <sc:MediaListBox ItemsSource="{Binding Items}" ItemTemplate="{StaticResource SettingsItemTemplate}"/>
        </DataTemplate>
    </phone:PhoneApplicationPage.Resources>
        
    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <sc:MediaPivot x:Name="SettingsPivot" Title="{StaticResource main_settings}" ItemsSource="{Binding Pivots}" ItemTemplate="{StaticResource SettingsPivotItemTemplate}"/>

        <!--
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        < !- -TitlePanel contains the name of the application and page title- - >
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
            <TextBlock x:Name="ApplicationTitle" Text="{StaticResource settings_title}" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>

        <!- -ContentPanel - place additional content here- ->
        <Grid x:Name="ContentGrid" Grid.Row="1">
            <ListBox ItemsSource="{Binding Pivots}" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel>
                            <TextBlock x:Name="ItemText" Text="{Binding Title}" Margin="-2,-13,0,0" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                            <sc:MediaListBox ItemsSource="{Binding Items}" ItemTemplate="{StaticResource SettingsItemTemplate}"/>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
-->
    </Grid>
</sc:MediaApplicationPage>
